Control Plane Device Switching Method and Apparatus, and Forwarding-Control Separation System

ABSTRACT

A control plane (CP) device switching method includes that when a user plane (UP) device in a forwarding-control separation system detects that performance of communication between the UP device and an active CP device does not meet a normal communication condition, and performance of communication between the UP device and a standby CP device meets the normal communication condition, the UP device sends a switching request to the standby CP device. When detecting that a quantity of UP devices that each send the switching request is greater than or equal to a first quantity threshold, the standby CP device may indicate each UP device in the forwarding-control separation system to switch to the standby CP device.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a continuation of U.S. patent application Ser. No. 17/181,167filed on Feb. 22, 2021, which is a continuation of International PatentApplication No. PCT/CN2019/101240 filed on Aug. 18, 2019, which claimspriority to Chinese Patent Application No. 201810969568.2 filed on Aug.23, 2018. All of the aforementioned patent applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the communications field, and in particular,to a control plane device switching method and apparatus, and aforwarding-control separation system.

BACKGROUND

A broadband remote access server (BRAS) is a new access gateway orientedto a broadband network application. The BRAS is deployed in a manner inwhich a control plane (CP) device and a user plane (UP) device areseparated (CU separation). In a BRAS system with CU separationdeployment, a plurality of UP devices is deployed in a distributedmanner, to forward a user data packet. CP devices may be implemented byusing a cloudification technology and deployed in a centralized manner,to implement user control and management, and manage the plurality of UPdevices together. The UP device may also be referred to as a forwardingplane device. Therefore, the CU separation deployment may also bereferred to as forwarding-control separation deployment, and the systemwith CU separation deployment is also referred to as aforwarding-control separation system.

In a related technology, to ensure data security, an active CP deviceand a standby CP device are usually deployed in the BRAS system. Alldata of the active CP device is backed up in the standby CP device, andan active/standby communication protocol such as a Virtual RouterRedundancy Protocol (VRRP) may be deployed between the standby CP deviceand the active CP device. When the standby CP device detects, based onthe active/standby communication protocol, that the active CP device isfaulty, the standby CP device may indicate each UP device to switch tothe standby CP device. In other words, the standby CP device mayautomatically replace the active CP device.

However, in the related technology, a CP device switching method basedon fault detection has relatively low flexibility.

SUMMARY

This disclosure provides a control plane device switching method andapparatus, and a forwarding-control separation system, to resolve aproblem that a CP device switching method has relatively low flexibilityin a related technology. The technical solutions are as follows.

According to one aspect, this disclosure provides a control plane deviceswitching method. The method may be applied to a UP device in aforwarding-control separation system. The forwarding-control separationsystem may further include an active CP device and a standby CP device.The method may include the following. The UP device detects performanceof communication between the UP device and the active CP device andperformance of communication between the UP device and the standby CPdevice. When detecting that the performance of communication between theUP device and the active CP device does not meet a normal communicationcondition, and the performance of communication between the UP deviceand the standby CP device meets the normal communication condition, theUP device sends a switching request to the standby CP device. Whenreceiving a switching instruction sent by the standby CP device, the UPdevice may switch to the standby CP device according to the switchinginstruction.

The switching instruction may be associated with the fact that aquantity of UP devices that each send the switching request is greaterthan or equal to a first quantity threshold. For example, the switchinginstruction may be sent by the standby CP device after the standby CPdevice detects that the quantity of UP devices that each send theswitching request is greater than or equal to the first quantitythreshold.

According to the control plane device switching method provided in thisdisclosure, the UP device may separately detect the performance ofcommunication between the UP device and the active CP device and theperformance of communication between the UP device and the standby CPdevice, and may send the switching request to the standby CP device. Inaddition, the UP device may switch to the standby CP device according tothe switching instruction sent by the standby CP device. Therefore, itcan be ensured that the UP device normally communicates with the standbyCP device, and it can be further ensured that the standby CP device cannormally process a user service, so that normal user service processingis prevented from being affected when the performance of communicationbetween the UP device and the active CP device degrades. The controlplane device switching method provided in this disclosure has relativelyhigh flexibility, and effectively improves reliability of theforwarding-control separation system.

In an optional implementation, when detecting that a quantity of datapacket retransmissions to the active CP device within preset duration isgreater than or equal to a retransmission quantity threshold, the UPdevice may detect the performance of communication between the UP deviceand the active CP device and the performance of communication betweenthe UP device and the standby CP device.

Compared with a mechanism in which the UP device monitors in real timethe performance of communication between the UP device and the active CPdevice and the performance of communication between the UP device andthe standby CP device, in a mechanism of triggering performancemonitoring based on the quantity of retransmissions, fewer resources ofthe UP device may be occupied, thereby effectively reducing resourceconsumption of the UP device.

In another optional implementation, after receiving a detectioninstruction sent by the standby CP device, the UP device may detect theperformance of communication between the UP device and the active CPdevice and the performance of communication between the UP device andthe standby CP device.

The detection instruction may be periodically sent by the standby CPdevice to the UP device based on a preset detection period. Therefore,the standby CP device may monitor, by periodically sending the detectioninstruction, the performance of communication between the UP device andthe active CP device and the performance of communication between the UPdevice and the standby CP device.

Alternatively, the detection instruction may be sent by the standby CPdevice after the standby CP device detects that the quantity of UPdevices that each send the switching request is greater than or equal toa second quantity threshold.

After detecting that the quantity of UP devices that each send theswitching request is greater than or equal to the second quantitythreshold, the standby CP device may send a detection instruction to aUP device that does not send a switching request in theforwarding-control separation system, so that performance ofcommunication between another UP device and the active CP device can befurther determined, thereby ensuring switching reliability.

Optionally, the forwarding-control separation system may further includea network management device. After the UP device detects the performanceof communication between the UP device and the active CP device and theperformance of communication between the UP device and the standby CPdevice, the method may further include the following.

When detecting that the performance of communication between the UPdevice and the active CP device does not meet the normal communicationcondition, and the performance of communication between the UP deviceand the standby CP device does not meet the normal communicationcondition either, the UP device may report alarm information to thenetwork management device, where the alarm information is used toindicate that communication of the UP device is abnormal.

When detecting that neither of the performance of communication betweenthe UP device and the active CP device and the performance ofcommunication between the UP device and the standby CP device meets thenormal communication condition, the UP device may determine thatcommunication performance of the UP device may be abnormal. Therefore,the UP device reports the alarm information to the network managementdevice, so that a network administrator that monitors the networkmanagement device can detect and repair the UP device in time based onthe alarm information, thereby further ensuring reliability of theforwarding-control separation system.

Optionally, within a first time period after the switching request issent to the standby CP device, the UP device may further continue todetect the performance of communication between the UP device and theactive CP device and the performance of communication between the UPdevice and the standby CP device. When detecting, within the first timeperiod, that the performance of communication between the UP device andthe active CP device meets the normal communication condition, the UPdevice may send a switching cancellation request to the standby CPdevice. The switching cancellation request may be used to indicate towithdraw a switching request previously sent by the UP device.

The UP device continues to monitor the communication performance withinthe first time period after sending the switching request, so thatcommunication performance detection accuracy can be ensured. Whendetecting that the performance of communication between the UP deviceand the active CP device meets the normal communication condition, theUP device may send the switching cancellation request to withdraw thepreviously sent switching request, so as to ensure accuracy ofcalculating, by the standby CP device, the quantity of UP devices thateach send the switching request.

Optionally, a process in which the UP device detects the performance ofcommunication between the UP device and the active CP device and theperformance of communication between the UP device and the standby CPdevice may include detecting a value of at least one communicationperformance parameter of communication between the UP device and theactive CP device and a value of at least one communication performanceparameter of communication between the UP device and the standby CPdevice.

Correspondingly, that communication performance meets the normalcommunication condition may mean that a quantity of communicationperformance parameters that are in the at least one communicationperformance parameter and whose values are within a corresponding normalvalue range is greater than or equal to a preset quantity threshold.That communication performance does not meet the normal communicationcondition may mean that a quantity of communication performanceparameters that are in the at least one communication performanceparameter and whose values are within a corresponding normal value rangeis less than the preset quantity threshold.

The at least one communication performance parameter may include atleast one of the following parameters: a packet loss rate, a packeterror ratio, a communication delay, and the like. The preset quantitythreshold may be flexibly adjusted based on a performance requirement ofthe forwarding-control separation system. For example, the presetquantity threshold may be 1 or 3.

According to another aspect, this disclosure provides a CP deviceswitching method. The method may be applied to a standby CP device in aforwarding-control separation system. The forwarding-control separationsystem may further include an active CP device and a plurality of UPdevices. The method may include the following.

The standby CP device receives a switching request sent by at least oneUP device, and detects whether a quantity of UP devices that each sendthe switching request is greater than or equal to a first quantitythreshold. The switching request sent by any UP device may be used toindicate that performance of communication between the any UP device andthe active CP device does not meet a normal communication condition, andperformance of communication between the any UP device and the standbyCP device meets the normal communication condition. When detecting thatthe quantity of UP devices that each send the switching request isgreater than or equal to the first quantity threshold, the standby CPdevice may separately send a switching instruction to each of theplurality of UP devices, where the switching instruction is used toinstruct a UP device that receives the switching instruction to switchto the standby CP device.

According to the control plane device switching method provided in thisdisclosure, when the quantity of UP devices that each send the switchingrequest is greater than or equal to the first quantity threshold, thestandby CP device may indicate each UP device in the forwarding-controlseparation system to switch to the standby CP device. Therefore, it canbe ensured that the UP device normally communicates with the standby CPdevice, and it can be further ensured that the standby CP device cannormally process a user service, so that normal user service processingis prevented from being affected when the performance of communicationbetween the UP device and the active CP device degrades. The controlplane device switching method provided in this disclosure has relativelyhigh flexibility, and effectively improves reliability of theforwarding-control separation system.

Optionally, before the standby CP device detects whether the quantity ofUP devices that each send the switching request is greater than or equalto the first quantity threshold, the method may further include thefollowing.

When detecting that the quantity of UP devices that each send theswitching request is greater than or equal to a second quantitythreshold, the standby CP device sends a detection instruction to a UPdevice that is in the plurality of UP devices and that does not send aswitching request, where the detection instruction is used to instructthe UP device that does not send a switching request to detectperformance of communication between the UP device and the active CPdevice and performance of communication between the UP device and thestandby CP device.

After detecting that the quantity of UP devices that each send theswitching request is greater than or equal to the second quantitythreshold, the standby CP device may send the detection instruction tothe UP device that does not send the switching request in theforwarding-control separation system, so that performance ofcommunication between another UP device and the active CP device can befurther determined, thereby ensuring switching reliability.

In an optional implementation, when detecting whether the quantity of UPdevices that each send the switching request is greater than or equal tothe first quantity threshold, the standby CP device may detect whether asum of a quantity of UP devices that each send the switching requestbefore the detection instruction is sent and a quantity of UP devicesthat each send the switching request within a second time period afterthe detection instruction is sent is greater than or equal to the firstquantity threshold, where the first quantity threshold may be greaterthan the second quantity threshold, and both the first quantitythreshold and the second quantity threshold may be determined based on atotal quantity of UP devices included in the forwarding-controlseparation system.

In another optional implementation, when detecting whether the quantityof UP devices that each send the switching request is greater than orequal to the first quantity threshold, the standby CP device may detect,beyond a second time period after the detection instruction is sent,whether a quantity of UP devices that each send the switching requestwithin the second time period is greater than or equal to the firstquantity threshold.

Optionally, the standby CP device may detect, within a specified timeperiod, whether a quantity of UP devices that each send the switchingrequest is greater than or equal to the first quantity threshold. Ifdetecting that the quantity of UP devices that each send the switchingrequest within the specified time period is less than the first quantitythreshold, the standby CP device may send a switching cancellationinstruction to each UP device that sends the switching request. Theswitching cancellation instruction is used to indicate that the UPdevice currently does not meet a switching condition. After receivingthe switching cancellation instruction, the UP device may keep a currentstate unchanged, or may send a switching cancellation request to thestandby CP device.

The specified time period may be a time period starting from a moment atwhich the standby CP device receives the first switching request, or maybe a time period starting from a moment at which a switchingcancellation instruction is sent last time. Alternatively, in a case inwhich the standby CP device periodically sends a detection instruction,the specified time period may be a time period starting from a moment atwhich the detection instruction is sent. In a case in which the standbyCP device sends the detection instruction to the UP device that does notsend the switching request, the specified time period may be the secondtime period, or the specified time period may include the second timeperiod and a time period that is required by the standby CP device todetect that the quantity of UP devices that each send the switchingrequest is greater than or equal to the second quantity threshold.

Optionally, after receiving the switching request sent by the UP device,when receiving a switching cancellation request sent by the UP devicethat sends the switching request, the standby CP device may determinethat the UP device that sends the switching cancellation request is theUP device that does not send the switching request.

The switching cancellation request is sent by the UP device when the UPdevice detects that performance of communication between the UP deviceand the active CP device meets the normal communication condition, andthe switching cancellation request may be used to indicate to withdrawthe switching request previously sent by the UP device. Therefore, thestandby CP device determines that the UP device that sends the switchingcancellation request is the UP device that does not send the switchingrequest, so that accuracy of calculating the quantity of UP devices thateach send the switching request can be ensured, thereby ensuringswitching reliability.

Optionally, the forwarding-control separation system may be aforwarding-control separation BRAS system.

According to still another aspect, a UP device is provided. The UPdevice may be applied to a forwarding-control separation system. Theforwarding-control separation system may further include an active CPdevice and a standby CP device. The UP device may include at least onemodule, and the at least one module may be configured to implement thecontrol plane device switching method that is applied to the UP deviceand that is provided in the foregoing aspect.

According to yet another aspect, a standby CP device is provided. Thestandby CP device may be applied to a forwarding-control separationsystem. The forwarding-control separation system may further include anactive CP device and a plurality of UP devices. The standby CP devicemay include at least one module, and the at least one module may beconfigured to implement the control plane device switching method thatis applied to the standby CP device and that is provided in theforegoing aspect.

According to yet another aspect, a CP device switching apparatus isprovided. The apparatus may include a memory, a processor, and acomputer program that is stored in the memory and that can run on theprocessor. When the processor executes the computer program, theprocessor implements the control plane device switching method providedin the foregoing aspects.

According to yet another aspect, a forwarding-control separation systemis provided. The system may include an active CP device, the standby CPdevice provided in the foregoing aspect, and a plurality of UP devicesprovided in the foregoing aspect.

According to yet another aspect, a computer-readable storage medium isprovided. The computer-readable storage medium stores an instruction,and when the computer-readable storage medium is run on a computer, thecomputer is enabled to perform the control plane device switching methodprovided in the foregoing aspects.

According to yet another aspect, a computer program product including aninstruction is provided, and when the computer program product is run ona computer, the computer is enabled to perform the control plane deviceswitching method provided in the foregoing aspects.

In conclusion, this disclosure provides the control plane deviceswitching method and apparatus, and the forwarding-control separationsystem. When performance of communication between the active CP deviceand each of a large quantity of UP devices in the forwarding-controlseparation system degrades, and performance of communication between thestandby CP device and each of the large quantity of UP devices isrelatively good, each UP device in the forwarding-control separationsystem may switch to the standby CP device according to the switchinginstruction sent by the standby CP device, so that the standby CP devicecan replace the active CP device to work. This ensures normal userservice running. Compared with a method in the related technology, thecontrol plane device switching method in this disclosure not only hasrelatively high flexibility, but also can effectively improvereliability of the forwarding-control separation system.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic structural diagram of a forwarding-controlseparation system according to an embodiment of the present disclosure;

FIG. 2 is a flowchart of a CP device switching method according to anembodiment of the present disclosure;

FIG. 3 is a schematic structural diagram of a UP device according to anembodiment of the present disclosure;

FIG. 4 is a schematic structural diagram of another UP device accordingto an embodiment of the present disclosure;

FIG. 5 is a schematic structural diagram of a standby CP deviceaccording to an embodiment of the present disclosure;

FIG. 6 is a schematic structural diagram of another standby CP deviceaccording to an embodiment of the present disclosure; and

FIG. 7 is a schematic structural diagram of a CP device switchingapparatus according to an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

FIG. 1 is a schematic structural diagram of a forwarding-controlseparation system according to an embodiment of the present disclosure.As shown in FIG. 1 , the system may include an active CP device 01, astandby CP device 02, and a plurality of UP devices 03. The active CPdevice 01 and the standby CP device 02 are usually deployed in a datacenter (DC) equipment room of an operator, which is also referred to asa core equipment room. In addition, the active CP device 01 and thestandby CP device 02 are usually deployed in different DC equipmentrooms. All data in the active CP device 01 is backed up in the standbyCP device 02, so that remote disaster recovery protection can beimplemented. The UP devices 03 may be distributed in differentaggregation equipment rooms, which are also referred to as edgeequipment rooms. Each CP device may communicate with each UP device 03through a wide area network including a forwarding device 04 (forexample, a router), and exchange data with each UP device 03. The activeCP device 01 is responsible for user control and management. Forexample, in a BRAS system, the active CP device 01 is responsible forBRAS user login, configuration delivery, and forwarding entry delivery.Each UP device 03 is responsible for forwarding an actual user datapacket (that is, a service packet).

In the forwarding-control separation system, the active CP device 01 maybe implemented by using a cloudification technology. As shown in FIG. 1, the active CP device 01 may include a plurality of virtual machines(VMs) deployed on a physical server, and the plurality of VMs may bemanaged together by a hypervisor running on the physical server. Anarchitecture of the standby CP device 02 may be similar to thearchitecture of the active CP device 01. Details are not describedherein again.

Because the active CP device 01 and the UP device 03 are deployed atdifferent network locations, data communication needs to be performedbetween the active CP device 01 and the UP device 03 through a wide areanetwork such as a metropolitan area network or a backbone network. Aproblem that performance of communication between the active CP device01 and the UP device 03 degrades because a network hardware fault or anunstable transmission link frequently occurs in the network. Forexample, when the network hardware fault occurs, an irregular packetloss may occur between the active CP device 01 and the UP device 03.Consequently, a data packet is continuously retransmitted between theactive CP device 01 and the UP device 03, and normal processingperformed by the active CP device 01 on a user service is affected.

An embodiment of the present disclosure provides a CP device switchingmethod, to resolve problems in a related technology that a switchingmethod has relatively low flexibility and normal processing of a userservice is affected because performance of communication between anactive CP device and a UP device degrades. The CP device switchingmethod may be applied to the forwarding-control separation system shownin FIG. 1 , for example, may be applied to a BRAS system. Referring toFIG. 2 , the method may include the following steps.

Step 101: A UP device detects performance of communication with anactive CP device and performance of communication with a standby CPdevice.

In this embodiment of the present disclosure, in each UP device in theforwarding-control separation system, an end-to-end performancedetection protocol for communication between the UP device and theactive CP device and communication between the UP device and the standbyCP device may be deployed. The performance detection protocol mayinclude any one of a Network Quality Analysis (NQA) protocol, a Requestfor Comments (RFC) 2544 protocol, a Two-Way Active Measurement Protocol(TWAMP), a Packet Internet Groper (PING) protocol, and the like. Each UPdevice may detect the performance of communication between the UP deviceand the active CP device and the performance of communication betweenthe UP device and the standby CP device according to the performancedetection protocol, and detect whether the communication performancemeets a normal communication condition. The normal communicationcondition may be preset based on a performance requirement of theforwarding-control separation system. Optionally, if the performancedetection protocol is a two-way detection protocol such as the NQAprotocol, the RFC 2544 protocol, or the TWAMP, corresponding performancedetection protocols also need to be deployed in the active CP device andthe standby CP device. If the performance detection protocol is aone-way detection protocol such as the PING protocol, the performancedetection protocol may be deployed only in the UP device.

When the UP device detects performance of communication between the UPdevice and a CP device, the UP device may detect a value of at least onecommunication performance parameter of communication between the UPdevice and the CP device. That the performance of communication betweenthe UP device and the CP device meets the normal communication conditionmay mean that a quantity of communication performance parameters thatare in the at least one communication performance parameter ofcommunication between the UP device and the CP device and whose valuesare within a corresponding normal value range is greater than or equalto a preset quantity threshold. Correspondingly, that the performance ofcommunication between the UP device and the CP device does not meet thenormal communication condition may mean that a quantity of communicationperformance parameters that are in the at least one communicationperformance parameter of communication between the UP device and the CPdevice and whose values are within a corresponding normal value range isless than the preset quantity threshold.

The at least one communication performance parameter may include atleast one of a packet loss rate, a packet error ratio, and acommunication delay. The preset quantity threshold may be flexiblyadjusted based on an application scenario and an applicationrequirement. For example, the preset quantity threshold may be 1. Inthis case, when the UP device detects that a value of any communicationperformance parameter of communication between the UP device and theactive CP device is within the corresponding value range, the UP devicemay determine that the performance of communication between the UPdevice and the active CP device meets the normal communicationcondition. Alternatively, the preset quantity threshold may be equal toa quantity of communication performance parameters detected by the UPdevice. In this case, when the UP device detects that a value of anycommunication performance parameter of communication between the UPdevice and the active CP device is not within the corresponding valuerange, the UP device may determine that the performance of communicationbetween the UP device and the active CP device does not meet the normalcommunication condition.

In this embodiment of the present disclosure, when detecting that theperformance of communication between the UP device and the active CPdevice does not meet the normal communication condition, and theperformance of communication between the UP device and the standby CPdevice does not meet the normal communication condition either, the UPdevice may perform step 102. When detecting that the performance ofcommunication between the UP device and the active CP device does notmeet the normal communication condition, and the performance ofcommunication between the UP device and the standby CP device meets thenormal communication condition, the UP device may perform step 103. Whendetecting that the performance of communication between the UP deviceand the active CP device meets the normal communication condition, theUP device may keep a current state, and that the UP device keeps acurrent state may mean that the UP device does not continue to performthe method in any one of step 103 to step 105.

For example, if the NQA protocol is deployed in each UP device, the UPdevice may separately obtain, according to the NQA protocol, a value ofat least one communication performance parameter of communicationbetween the UP device and the active CP device and a value of at leastone communication performance parameter of communication between the UPdevice and the standby CP device, and detect whether the obtained valueof each communication performance parameter is within the normal valuerange indicated by the normal communication condition. It is assumedthat the communication performance parameter detected by the UP deviceincludes three communication performance parameters: the packet lossrate, the packet error ratio, and the communication delay. If the presetquantity threshold is equal to a quantity of communication performanceparameters detected by the UP device, in other words, the presetquantity threshold is equal to 3, when the UP device detects that apacket loss rate between the UP device and a specific CP device is notgreater than a maximum packet loss rate threshold, a packet error ratiois not greater than a maximum packet error ratio threshold, and acommunication delay is not greater than a maximum communication delaythreshold, the UP device may determine that performance of communicationbetween the UP device and the CP device meets the normal communicationcondition. If the UP device detects that a value of any communicationperformance parameter of communication between the UP device and the CPdevice is greater than a corresponding maximum threshold, the UP devicemay determine that the performance of communication between the UPdevice and the CP device does not meet the normal communicationcondition.

Optionally, if the communication performance parameter detected by theUP device includes the packet loss rate, when the UP device calculatesthe packet loss rate, the UP device may determine, through statisticscollection, that both a wrong data packet and a data packet with anexcessively long communication delay are lost. Then. the UP device maycalculate the packet loss rate based on a quantity of lost packets thatis actually obtained through statistics collection and a quantity oflost packets that is obtained through statistics collection based on thewrong data packet and the data packet with an excessively longcommunication delay, and detect whether the packet loss rate is greaterthan the maximum packet loss rate threshold. The maximum packet lossrate threshold may be 50%.

In an optional implementation of this embodiment of the presentdisclosure, each UP device in the forwarding-control separation systemmay collect, in real time, statistics about a quantity of data packetretransmissions between the UP device and the active CP device, or maycollect, at an interval of preset duration, statistics about a quantityof data packet retransmissions performed between the UP device and theactive CP device within the preset duration. When detecting that thequantity of data packet retransmissions performed between the UP deviceand the active CP device within the preset duration is greater than orequal to a retransmission quantity threshold, the UP device maydetermine that the performance of communication between the UP deviceand the active CP device may degrade. Therefore, performance monitoringshown in step 101 may be triggered. To be specific, the UP devicedetects the performance of communication between the UP device and theactive CP device and the performance of communication between the UPdevice and the standby CP device. Compared with a mechanism in which theUP device monitors the performance of communication between the UPdevice and the active CP device and the performance of communicationbetween the UP device and the standby CP device in real time, in amechanism of triggering performance monitoring based on the quantity ofretransmissions, fewer resources of the UP device may be occupied, so asto effectively reduce resource consumption of the UP device.

Both the preset duration and the retransmission quantity threshold maybe preset based on a performance requirement of the forwarding-controlseparation system. For example, the preset duration may be 100 seconds,and the retransmission quantity threshold may be 3, or the presetduration may be 300 seconds, and the retransmission quantity thresholdmay be 10.

For example, the UP device may monitor in real time and collectstatistics about a quantity of Transmission Control Protocol (TCP) datapacket retransmissions between the UP device and the active CP device.It is assumed that the preset duration is 300 seconds, and theretransmission quantity threshold is 10. In this case, when a specificUP device detects that a quantity of TCP data packet retransmissionsperformed between the UP device and the active CP device within 300seconds is greater than or equal to 10, the UP device may detectperformance of communication between the UP device and the active CPdevice and performance of communication between the UP device and thestandby CP device.

In another optional implementation of this embodiment of the presentdisclosure, after receiving a detection instruction sent by the standbyCP device, the UP device in the forwarding-control separation system mayalternatively trigger performance monitoring shown in step 101 accordingto the detection instruction.

Optionally, the detection instruction may be sent by the standby CPdevice to a UP device in the forwarding-control separation system whenthe standby CP device detects that a quantity of UP devices that eachsend a switching request is greater than or equal to a second quantitythreshold, where the UP device does not send a switching request.Alternatively, the detection instruction may be periodically sent by thestandby CP device to the UP device based on a preset detection period.For example, the standby CP device may send a detection instruction toeach UP device in the forwarding-control separation system every onehour. Therefore, the standby CP device may monitor, by periodicallysending the detection instruction to the UP device, the performance ofcommunication between the UP device and the active CP device and theperformance of communication between the UP device and the standby CPdevice.

In still another optional implementation of this embodiment of thepresent disclosure, each UP device in the forwarding-control separationsystem may alternatively monitor the performance of communicationbetween the UP device and the active CP device and the performance ofcommunication between the UP device and the standby CP device in realtime.

Step 102: The UP device reports alarm information to a networkmanagement device.

In this embodiment of the present disclosure, the network managementdevice configured to monitor performance of each device in the systemmay be further deployed in the forwarding-control separation system, andthe network management device may be monitored by a networkadministrator in real time. When the UP device detects that neither ofthe performance of communication between the UP device and the active CPdevice and the performance of communication between the UP device andthe standby CP device meets the normal communication condition, the UPdevice may report the alarm information to the network managementdevice. The alarm information is used to indicate that communication ofthe UP device is abnormal, so that the network administrator thatmonitors the network management device can detect and repair, based onthe alarm information, the UP device or network hardware connected tothe UP device.

Step 103: The UP device sends a switching request to the standby CPdevice, and then performs step 104.

When the UP device detects that the performance of communication betweenthe UP device and the active CP device does not meet the normalcommunication condition, and the performance of communication betweenthe UP device and the standby CP device meets the normal communicationcondition, to prevent normal user service processing by the active CPdevice from being affected when the communication performance degrades,the UP device may send the switching request to the standby CP device,and the standby CP device may receive the switching request sent by theUP device. The switching request sent by the UP device may be used torequest to switch to the standby CP device.

Step 104: The UP device continues to detect, within a first time periodafter the UP device sends the switching request to the standby CPdevice, the performance of communication between the UP device and theactive CP device and the performance of communication between the UPdevice and the standby CP device.

In this embodiment of the present disclosure, to ensure communicationperformance detection accuracy, the UP device may continue to detect,within the first time period after the UP device sends the switchingrequest, the performance of communication between the UP device and theactive CP device and the performance of communication between the UPdevice and the standby CP device. When the UP device detects, within thefirst time period, that the performance of communication between the UPdevice and the active CP device meets the normal communicationcondition, the UP device may determine that the UP device can normallycommunicate with the active CP device, and does not need to switch tothe standby CP device. Therefore, the UP device may perform step 105. Ifthe UP device does not detect, within the first time period, that theperformance of communication between the UP device and the active CPdevice meets the normal communication condition, the UP device may keepthe current state unchanged.

The first time period may be preset in the UP device, for example, maybe 10 seconds or 1 minute. This is not limited in this embodiment of thepresent disclosure.

Step 105: Send a switching cancellation request to the standby CPdevice.

When the UP device detects, within the first time period, that theperformance of communication between the UP device and the active CPdevice meets the normal communication condition, the UP device maydetermine that the performance of communication between the UP deviceand the active CP device is recovered, or may determine that a previousdetection result is wrong. Therefore, the UP device may send theswitching cancellation request to the standby CP device, and the standbyCP device may receive the switching cancellation request sent by the UPdevice. The switching cancellation request may be used to indicate theUP device to withdraw the previously sent switching request. Therefore,after receiving the switching cancellation request, the standby CPdevice may determine that the UP device is a UP device that does notsend a switching request.

Optionally, after step 102, the UP device may alternatively perform step104. To be specific, the UP device may continue to detect, within thefirst time period after the UP device reports the alarm information, theperformance of communication between the UP device and the active CPdevice and the performance of communication between the UP device andthe standby CP device. Likewise, when detecting, within the first timeperiod, that the performance of communication between the UP device andthe active CP device meets the normal communication condition, the UPdevice may send alarm cancellation information to the network managementdevice. The alarm cancellation information is used to indicate the UPdevice to withdraw the previously sent alarm information.

Step 106: When receiving the switching cancellation request sent by theUP device, the standby CP device determines that the UP device is the UPdevice that does not send the switching request.

After the standby CP device receives, in step 103, the switching requestsent by the UP device, the standby CP device may collect statisticsabout a quantity of UP devices that each send the switching request. Inthe statistics collection process, if the standby CP device receives theswitching cancellation request sent by the UP device that sends theswitching request, because the switching cancellation request is used toindicate the UP device to withdraw the previously sent switchingrequest, the standby CP device may determine that the UP device thatsends the switching cancellation request is the UP device that does notsend a switching request. In other words, when the standby CP devicecollects statistics about the quantity of UP devices that each send aswitching request, the standby CP device does not collect statisticsabout a UP device that sends a switching request and then sends aswitching cancellation request.

For example, if one UP device sends a switching request for a pluralityof times, in this embodiment of the present disclosure, the standby CPdevice may collect statistics about a quantity of UP devices that eachsend a switching request, but not collect statistics about a quantity ofreceived switching requests. Therefore, when one UP device sends aswitching request for a plurality of times, the standby CP device mayperform statistics collection only once. This ensures accuracy of astatistical result. In another embodiment, if one UP device sends aswitching request only once, the standby CP device may also collectstatistics about a quantity of received switching requests.

Step 107: When detecting that the quantity of UP devices that each senda switching request is greater than or equal to the second quantitythreshold, the standby CP device sends a detection instruction to a UPdevice that does not send a switching request in the forwarding-controlseparation system, and then performs step 108.

The second quantity threshold may be determined based on a totalquantity of UP devices included in the forwarding-control separationsystem, for example, may be 30% or 35% of the total quantity of UPdevices. When the standby CP device detects that the quantity of UPdevices that each send a switching request is greater than or equal tothe second quantity threshold, the standby CP device may determine thatperformance of communication between each of a relatively large quantityof UP devices and the active CP device in the forwarding-controlseparation system degrades. To further determine performance ofcommunication between another UP device and the active CP device toensure switching reliability, the standby CP device may send a detectioninstruction to a UP device that is in a plurality of UP devices includedin the forwarding-control separation system and that does not send aswitching request, and the detection instruction may be used to instructthe UP device that does not send a switching request to detectperformance of communication between the UP device and the active CPdevice and performance of communication between the UP device and thestandby CP device.

Correspondingly, after receiving the detection instruction, the UPdevice that does not send a switching request in the forwarding-controlseparation system may perform the method in step 101 and the methods instep 102 to step 105 according to the detection instruction, and detailsare not described herein again.

For example, it is assumed that the total quantity of UP devicesincluded in the forwarding-control separation system is 100, and thesecond quantity threshold M2 is 30. If the standby CP device detectsthat a quantity of UP devices that each send a switching requestcurrently is 31, the standby CP device may send a detection instructionto each of remaining 69 UP devices that each do not send a switchingrequest in the forwarding-control separation system. Each UP device thatreceives the detection instruction may separately perform the methods instep 101 to step 105.

Step 108: The standby CP device detects whether the quantity of UPdevices that each send a switching request is greater than or equal to afirst quantity threshold.

In this embodiment of the present disclosure, the standby CP device maycollect statistics about the quantity of UP devices that each send aswitching request, and detect whether the quantity of UP devices thateach send a switching request is greater than or equal to the firstquantity threshold. For example, the standby CP device may continuouslycollect statistics about the quantity of UP devices that each send aswitching request, and continuously detect whether the quantity of UPdevices that each send the switching request is greater than or equal tothe first quantity threshold. Alternatively, the standby CP device maydetect whether a quantity of UP devices that each send the switchingrequest within a specified time period is greater than or equal to thefirst quantity threshold.

When the standby CP device detects that the quantity of UP devices thateach send the switching request is greater than or equal to the firstquantity threshold, the standby CP device may perform step 109. When thestandby CP device detects that the quantity of UP devices that each sendthe switching request is less than the first quantity threshold, thestandby CP device may perform step 111.

In a case in which the standby CP device detects whether the quantity ofUP devices that each send the switching request within the specifiedtime period is greater than or equal to the first quantity threshold, ifthe standby CP device does not perform the method in step 107, thespecified time period may be a time period starting from a moment atwhich the standby CP device receives the first switching request, or maybe a time period starting from a moment at which a switchingcancellation instruction is sent last time. Alternatively, in a case inwhich the standby CP device periodically sends a detection instruction,the specified time period may be a time period starting from a moment atwhich the detection instruction is sent. For example, duration of thespecified time period may be 30 seconds or 1 minute.

Alternatively, in a case in which the standby CP device detects whetherthe quantity of UP devices that each send the switching request withinthe specified time period is greater than or equal to the first quantitythreshold, if the standby CP device performs the method in step 107, thestandby CP device may wait for each UP device to send a switchingrequest within a second time period after the standby CP device sendsthe detection instruction. To be specific, after sending the detectioninstruction, the standby CP device may start a waiting time window whoseduration is the second time period, and collect statistics about aquantity of UP devices that each send a switching request in the waitingtime window. In this case, the specified time period may be the secondtime period, or may include the second time period and a time periodthat is required by the standby CP device to detect that the quantity ofUP devices that each send a switching request is greater than or equalto the second quantity threshold in step 107. Duration of the secondtime period may be set according to an actual requirement of theforwarding-control separation system, for example, may be 10 seconds, 30seconds, or 1 minute. After the second time period, the standby CPdevice may detect whether the quantity of UP devices that each send aswitching request is greater than or equal to the first quantitythreshold.

In a case in which the standby CP device performs the method in step107, in an optional implementation, the standby CP device may detectwhether a sum of a quantity m1 of UP devices that each send theswitching request before the standby CP device sends the detectioninstruction and a quantity m2 of UP devices that each send the switchingrequest within a second time period after the standby CP device sendsthe detection instruction is greater than or equal to the first quantitythreshold M1. In other words, the standby CP device may detect whetherm1+m2 is greater than or equal to M1, and may perform step 109 whendetecting that m1+m2 is greater than or equal to M1. It can be learnedthat, in this implementation, the specified time period includes thesecond time period and a time period that is required by the standby CPdevice to detect that the quantity of UP devices that each send aswitching request is greater than or equal to the second quantitythreshold in step 107. The first quantity threshold M1 may be greaterthan the second quantity threshold M2, and the first quantity thresholdM1 may also be determined based on a total quantity of UP devicesincluded in the forwarding-control separation system. For example, thefirst quantity threshold M1 may be 50% of the total quantity of UPdevices.

For example, it is assumed that the total quantity of UP devicesincluded in the forwarding-control separation system is 100, the firstquantity threshold M1 is 50, and the duration of the second time periodis 10 seconds. In this case, the standby CP device may wait for 69 UPdevices to send switching requests within 10 seconds after the standbyCP device sends a detection instruction to each of the 69 UP devices.

If the standby CP device detects that the quantity m2 of UP devices thateach send the switching request within 10 seconds is 25, because thequantity m1 that is of UP devices that each send a switching request andthat is obtained by the standby CP device through statistics collectionbefore the standby CP device sends the detection instruction is 31, thestandby CP device may determine that the sum m1+m2 of the quantity m1and the quantity m2 is: 31+25=56. Because the quantity sum 56 is greaterthan the first quantity threshold 50, the standby CP device may performstep 109.

If the standby CP device detects that the quantity m2 of UP devices thateach send a switching request within 10 seconds is 10, because thequantity m1 that is of UP devices that each send the switching requestand that is obtained by the standby CP device through statisticscollection before the standby CP device sends the detection instructionis 31, the standby CP device may determine that the sum m1+m2 of thequantity m1 and the quantity m2 is: 31+10=41. Because the quantity sum41 is less than the first quantity threshold 50, the standby CP devicemay perform step 111.

In a case in which the standby CP device performs the method in step107, in another optional implementation, the standby CP device maydetect, after a second time period after the standby CP device sends thedetection instruction, whether a quantity of UP devices that each sendthe switching request within the second time period is greater than orequal to the first quantity threshold. In other words, the standby CPdevice may detect whether m2 is greater than or equal to M1, and mayperform step 109 when detecting that m2 is greater than or equal to M1.It can be learned that, in this implementation, the specified timeperiod is the second time period. In addition, in this implementation,the first quantity threshold M1 may be determined based on a totalquantity of UP devices included in the forwarding-control separationsystem, and a value relationship between the first quantity threshold M1and the second quantity threshold M2 does not need to be limited,provided that a sum of the two values is less than the total quantity ofUP devices. For example, the first quantity threshold M1 may be 20% ofthe total quantity of UP devices.

For example, it is assumed that the total quantity of UP devicesincluded in the forwarding-control separation system is 100, the firstquantity threshold M1 is 20, and the duration of the second time periodis 10 seconds. If the standby CP device detects, beyond 10 seconds afterthe standby CP device sends a detection instruction to each of 69 UPdevices, that the quantity m2 of UP devices that each send a switchingrequest within 10 seconds is 23, because the quantity m2 is greater thanthe first quantity threshold 20, the standby CP device may perform step109. If the standby CP device detects, within 10 seconds, that thequantity m2 of UP devices that each send a switching request is 15,because the quantity m2 is less than the first quantity threshold 20,the standby CP device may perform step 111.

Step 109: The standby CP device sends a switching instruction to each ofthe plurality of UP devices.

When the standby CP device detects, in step 108, that the quantity of UPdevices that each send the switching request is greater than or equal tothe first quantity threshold, the standby CP device may determine thatperformance of communication between the active CP device and each of alarge quantity of UP devices degrades, and consequently a normalcommunication requirement cannot be met. Therefore, to prevent normaluser service processing from being affected, the standby CP device maysend the switching instruction to each of the plurality of UP devicesincluded in the forwarding-control separation system, and each UP devicemay receive the switching instruction sent by the standby CP device. Theswitching instruction is used to instruct a UP device that receives theswitching instruction to switch to the standby CP device, so that thestandby CP device can replace the active CP device to process a userservice and manage the plurality of UP devices in the forwarding-controlseparation system together. In other words, the standby CP device isupgraded to a new active CP device.

Optionally, in this embodiment of the present disclosure, when detectingthat the quantity of UP devices that each send the switching request isgreater than or equal to the first quantity threshold, the standby CPdevice may further send switching instruction information to the activeCP device. The switching instruction information is used to notify theactive CP device that the plurality of UP devices in theforwarding-control separation system will switch to the standby CPdevice. After receiving the switching instruction information, theactive CP device may perform an action such as power-off or restartrecovery.

Step 110: The UP device switches to the standby CP device according tothe received switching instruction.

In this embodiment of the present disclosure, after receiving theswitching instruction sent by the standby CP device, the UP device mayswitch to the standby CP device according to the switching instruction.In other words, the standby CP device replaces the active CP device towork.

Optionally, during deployment, each UP device may store identificationinformation of the active CP device and identification information ofthe standby CP device, for example, may store an Internet Protocol (IP)address of each CP device. After receiving the switching instructionsent by the standby CP device, the UP device may check the standby CPdevice based on identification information of the standby CP device thatis carried in the switching instruction. To be specific, the UP devicedetects whether the identification information of the standby CP devicethat is carried in the switching instruction is consistent with theidentification information of the standby CP device that is pre-storedby the standby CP device. If the identification information of thestandby CP device that is carried in the switching instruction isconsistent with the identification information of the standby CP devicethat is pre-stored by the standby CP device, the UP device may determinethat the check succeeds, and switch to the standby CP device. To bespecific, the UP device may mark the standby CP device as a new activeCP device, and forward a subsequently received data packet to the newactive CP device. If the UP device detects that the identificationinformation of the standby CP device that is carried in the switchinginstruction is inconsistent with the identification information of thestandby CP device that is pre-stored by the standby CP device, the UPdevice may determine that the check fails, may not perform the switchingoperation, and may send the alarm information to the network managementdevice.

When detecting that the performance of communication between the UPdevice and the active CP device does not meet the normal communicationcondition, and the performance of communication between the UP deviceand the standby CP device meets the normal communication condition, theUP device sends the switching request. Therefore, after the UP deviceswitches to the standby CP device, it can be ensured that the UP devicenormally communicates with the standby CP device, and it can be furtherensured that the standby CP device can normally process a user service.This ensures reliability of the forwarding-control separation system.

In another solution, a wide area network between the UP device and theactive CP device may also provide a reliability protection solution. Forexample, a network device in the wide area network may power off andisolate faulty network hardware when a packet loss is caused by anetwork hardware fault, or may trigger bit error linkage protection whena bit error occurs. However, in the foregoing reliability protectionsolution, a network device in the wide area network needs to have afault detection function and a protection switching function, and aprotection path exists between network devices, so as to ensure that astandby path is reachable after faulty network hardware or link isisolated. It can be learned from the foregoing analysis that thereliability protection solution provided by the wide area network has arelatively high network deployment requirement, high network deploymentcosts, and relatively low efficiency. In addition, when the foregoingreliability protection solution is not available in the wide areanetwork, an operation personnel can only perform troubleshooting afterperceiving that a user service is damaged, and then perform manualswitching between the active CP device and the standby CP device after afault is located. The manual switching solution of the operationpersonnel has relatively low efficiency and cannot rectify a fault intime.

However, in this embodiment of the present disclosure, the UP devicedetects the performance of communication between the UP device and theactive CP device and the performance of communication between the UPdevice and the standby CP device and reports the switching request, andthen the standby CP device triggers CP device switching based on aquantity of UP devices that each send a switching request. Therefore, itcan be ensured that performance of communication between the UP deviceand a CP device can meet the normal communication condition, normal userservice processing is prevented from being affected, and the reliabilityof the forwarding-control separation system is effectively improved. Inaddition, according to the switching method provided in this embodimentof the present disclosure, dependency on a reliability protectionsolution provided by a wide area network between the UP device and a CPdevice is alleviated. Regardless of whether the wide area networkprovides the reliability protection solution, the control plane deviceswitching method provided in this embodiment of the present disclosuremay be used, and the method has relatively high application flexibility.

Step 111: The standby CP device sends a switching cancellationinstruction to each UP device that sends the switching request.

When the standby CP device detects, in step 108, that the quantity of UPdevices that each send the switching request within the specified timeperiod is less than the first quantity threshold, the standby CP devicemay determine that performance of communication between the active CPdevice and each of a large quantity of UP devices can meet the normalcommunication requirement. Therefore, the standby CP device may send theswitching cancellation instruction to each UP device that sends theswitching request, and the UP device may receive the switchingcancellation instruction. The switching cancellation instruction may beused to indicate that a switching condition is not met currently.

In an optional implementation, the standby CP device may send theswitching cancellation instruction to each of all UP devices that eachsend the switching request. To be specific, regardless of whether the UPdevice sends the switching cancellation request, the standby CP devicemay send the switching cancellation instruction to the UP device in step111 when the UP device sends the switching request.

In another optional implementation, the standby CP device may send theswitching cancellation instruction only to a UP device that isdetermined by the standby CP device and that sends a switching request.In other words, if a specific UP device sends a switching cancellationrequest after sending a switching request, because the standby CP devicedetermines that the UP device is a UP device that does not send aswitching request, the standby CP device does not need to send theswitching cancellation instruction to the UP device in step 111.

After the UP device receives the switching cancellation instruction, ifthe first time period still does not expire, the UP device may stopdetecting the performance of communication between the UP device and theactive CP device and the performance of communication between the UPdevice and the standby CP device. If the first time period expires, inan optional implementation, the UP device may keep a current stateunchanged. In another optional implementation, the UP device mayalternatively perform the method in step 105. In other words, the UPdevice may send the switching cancellation request to the standby CPdevice. Accordingly, after receiving the switching cancellation request,the standby CP device may perform the method in step 107. In otherwords, the standby CP device determines that the UP device is a UPdevice that does not send a switching request. In addition, afterperforming the foregoing operation, the UP device may start a next roundof detection based on the switching cancellation instruction. In otherwords, the UP device continues to perform the methods in step 101 tostep 105. Accordingly, the standby CP device may continue to perform themethods in step 106 to step 108 based on the received switching requestsent by the UP device.

Optionally, if the UP device keeps the current state unchanged afterreceiving the switching cancellation instruction, in step 107 or step108, when the standby CP device collects statistics about the quantityof UP devices that each send a switching request, the standby CP devicemay start to collect statistics from a moment at which the switchingcancellation instruction is sent last time, or may collect statisticsonce at an interval of preset statistics collection duration (forexample, 30 minutes or 1 hour). If the UP device sends the switchingcancellation request to the standby CP device after receiving theswitching cancellation request, in step 107 or step 108, the standby CPdevice may continuously collect statistics about the quantity of UPdevices that each send a switching request.

Optionally, after step 109 and step 111, the standby CP device mayfurther record related information of this detection operation, and maysend the related information to the network management device, so thatthe network administrator may learn of a network status in time based onthe related information, so as to determine whether manual interventionis required. The related information may include a final operationresult and the quantity that is of UP devices that each send a switchingrequest and that is detected by the standby CP device. The operationresult is sending a switching instruction or sending a switchingcancellation instruction.

It should be noted that a sequence of performing the steps of thecontrol plane device switching method provided in this embodiment of thepresent disclosure may be properly adjusted, and a step may becorrespondingly added or omitted according to a situation. For example,step 102 may be deleted according to a situation. To be specific, whendetecting that performance of communication between the UP device andeach CP device does not meet the normal communication condition, the UPdevice may keep the current state unchanged. Alternatively, step 104 andstep 105 may be deleted according to a situation. Alternatively, step106 and step 107 may be deleted according to a situation. To bespecific, the standby CP device may directly detect whether the quantityof UP devices that each send a switching request is greater than orequal to the first quantity threshold. Alternatively, step 111 may bedeleted according to a situation. To be specific, when detecting thatthe quantity of UP devices that each send a switching request within thespecified time period is less than the first quantity threshold, thestandby CP device may not send the switching cancellation instruction.Any variation readily figured out by a person skilled in the art withinthe technical scope disclosed in this disclosure shall fall within theprotection scope of this disclosure, and details are not describedherein.

In conclusion, this embodiment of the present disclosure provides thecontrol plane device switching method. When the UP device in theforwarding-control separation system detects that the performance ofcommunication between the UP device and the active CP device does notmeet the normal communication condition, and the performance ofcommunication between the UP device and the standby CP device meets thenormal communication condition, the UP device may send the switchingrequest to the standby CP device. When the standby CP device detectsthat the quantity of UP devices that each send the switching request isgreater than or equal to the first quantity threshold, the standby CPdevice may indicate each UP device in the forwarding-control separationsystem to switch to the standby CP device. Therefore, when performanceof communication between the active CP device and each of a largequantity of UP devices degrades, and performance of communicationbetween the standby CP device and each of the large quantity of UPdevices is relatively good, each UP device may switch to the standby CPdevice, so that the standby CP device can replace the active CP deviceto work. This ensures normal user service running. Compared with themethod in the related technology, the control plane device switchingmethod provided in this embodiment of the present disclosure not onlyhas relatively high flexibility, but also can effectively improve thereliability of the forwarding-control separation system.

FIG. 3 is a schematic structural diagram of a UP device according to anembodiment of the present disclosure. The UP device may be applied to aforwarding-control separation system, for example, may be applied to theBRAS system shown in FIG. 1 . Referring to FIG. 1 , theforwarding-control separation system may further include the active CPdevice 01 and the standby CP device 02. As shown in FIG. 3 , the UPdevice may include a detection module 201, a first sending module 202,and a switching module 203.

The detection module 201 may be configured to implement the method shownin step 101 in the foregoing method embodiment.

The first sending module 202 may be configured to implement the methodshown in step 103 in the foregoing method embodiment.

The switching module 203 may be configured to implement the method shownin step 110 in the foregoing method embodiment.

In an optional implementation, the detection module 201 may beconfigured to, when detecting that a quantity of data packetretransmissions performed between the UP device and the active CP devicewithin preset duration is greater than or equal to a retransmissionquantity threshold, detect performance of communication with the activeCP device and performance of communication with the standby CP device.

In this embodiment of the present disclosure, the detection module 201in the UP device may include two detection submodules. One detectionsubmodule may be configured to detect the quantity of data packetretransmissions between the UP device and the active CP device. Theother detection submodule may be provided with a performance detectionprotocol, and may detect the performance of communication with theactive CP device and the performance of communication with the standbyCP device based on the performance detection protocol. For example, theother detection submodule may detect communication performanceparameters such as a packet loss rate, a packet error ratio, and acommunication delay of communication between the UP device and each CPdevice.

In another optional implementation, the detection module 201 may beconfigured to, after a detection instruction sent by the standby CPdevice is received, detect the performance of communication with theactive CP device and the performance of communication with the standbyCP device.

Optionally, the forwarding-control separation system may further includea network management device. As shown in FIG. 4 , the UP device mayfurther include a second sending module 204.

The second sending module 204 may be configured to implement the methodshown in step 102 in the foregoing method embodiment.

Optionally, the detection module 201 may be further configured toimplement the method shown in step 104 in the foregoing methodembodiment.

The first sending module 202 may be further configured to implement themethod shown in step 105 in the foregoing method embodiment.

In conclusion, this embodiment of the present disclosure provides theuser plane device. When detecting that the performance of communicationbetween the user plane device and the active CP device does not meet thenormal communication condition, and the performance of communicationbetween the user plane device and the standby CP device meets the normalcommunication condition, the user plane device may send the switchingrequest to the standby CP device, and may switch to the standby CPdevice according to the switching instruction sent by the standby CPdevice. Therefore, when performance of communication between the activeCP device and each of a large quantity of UP devices degrades, andperformance of communication between the standby CP device and each ofthe large quantity of UP devices is relatively good, each UP device mayswitch to the standby CP device, so that the standby CP device canreplace the active CP device to work. This ensures normal user servicerunning, thereby effectively improving reliability of theforwarding-control separation system.

FIG. 5 is a schematic structural diagram of a standby CP deviceaccording to an embodiment of the present disclosure. The standby CPdevice may be applied to a forwarding-control separation system, forexample, may be applied to the BRAS system shown in FIG. 1 . Referringto FIG. 1 , the forwarding-control separation system may further includethe active CP device 01 and the plurality of UP devices 03. As shown inFIG. 5 , the standby CP device may include a receiving module 301, adetection module 302, and a first sending module 303.

The receiving module 301 may be configured to receive a switchingrequest sent by at least one UP device, where the switching request sentby any UP device may indicate that performance of communication betweenthe any UP device and the active CP device does not meet a normalcommunication condition, and performance of communication between theany UP device and the standby CP device meets the normal communicationcondition.

The detection module 302 may be configured to implement the method shownin step 108 in the foregoing method embodiment.

The first sending module 303 may be configured to implement the methodshown in step 109 in the foregoing method embodiment.

Optionally, as shown in FIG. 6 , the standby CP device may furtherinclude a second sending module 304.

The second sending module 304 may be configured to implement the methodshown in step 107 in the foregoing method embodiment.

In an optional implementation, the detection module 302 may beconfigured to detect whether a sum of a quantity of user plane devicesthat each send the switching request before the detection instruction issent and a quantity of user plane devices that each send the switchingrequest within a second time period after the detection instruction issent is greater than or equal to the first quantity threshold in step108.

The first quantity threshold in step 108 is greater than the secondquantity threshold in step 107.

In another optional implementation, the detection module 302 may beconfigured to detect, beyond a second time period after the detectioninstruction is sent, whether a quantity of user plane devices that eachsend the switching request within the second time period is greater thanor equal to the first quantity threshold in step 108.

Optionally, the first sending module 303 may be further configured toimplement the method shown in step 111 in the foregoing methodembodiment.

Optionally, the detection module 302 may be further configured toimplement the method shown in step 106 in the foregoing methodembodiment.

In this embodiment of the present disclosure, if a performance detectionprotocol configured in the UP device is a two-way detection protocol,the standby CP device may further include a performance detectionmodule, and the performance detection module may be provided with acorresponding performance detection protocol. When the UP device detectsperformance of communication between the UP device and the standby CPdevice based on the performance detection protocol, the performancedetection module may be configured to respond to a performance detectionrequest sent by the UP device.

In conclusion, this embodiment of the present disclosure provides thestandby control plane device. After receiving a switching request sentby each of a large quantity of UP devices, the standby control planedevice indicates each UP device in the forwarding-control separationsystem to switch to the standby CP device. Therefore, when performanceof communication between the active CP device and each of the largequantity of UP devices degrades, and performance of communicationbetween the standby CP device and each of the large quantity of UPdevices is relatively good, the standby CP device may replace the activeCP device to work. This ensures normal user service running, therebyeffectively improving reliability of the forwarding-control separationsystem.

An embodiment of the present disclosure further provides a CP deviceswitching apparatus. The switching apparatus may be applied to a standbyCP device or a UP device in a forwarding-control separation system. Asshown in FIG. 7 , the apparatus may include a processor 1201 (forexample, a central processing unit (CPU)), a memory 1202, a networkinterface 1203, and a bus 1204. The bus 1204 is configured to connectthe processor 1201, the memory 1202, and the network interface 1203. Thememory 1202 may include a random-access memory (RAM), or may include anonvolatile memory, for example, at least one magnetic disk storage. Acommunication connection between a server and a communications device isimplemented by using the network interface 1203 (in a wired or wirelessmanner). The memory 1202 stores a computer program 12021, and thecomputer program 12021 is configured to implement various applicationfunctions.

When the switching apparatus is applied to the UP device, the processor1201 may be configured to execute the computer program 12021 stored inthe memory 1202, to implement the method performed by the UP device inthe method provided in the foregoing method embodiment. When theswitching apparatus is applied to the standby CP device, the processor1201 may be configured to execute the computer program 12021 stored inthe memory 1202, to implement the method performed by the standby CPdevice in the method provided in the foregoing method embodiment.

An embodiment of the present disclosure further provides aforwarding-control separation system. Referring to FIG. 1 , theforwarding-control separation system may include the active CP device01, the standby CP device 02, and the plurality of UP devices 03. Thestandby CP device 02 may be the device shown in FIG. 5 or FIG. 6 , andeach UP device 03 may be the device shown in FIG. 3 or FIG. 4 .

An embodiment of the present disclosure further provides acomputer-readable storage medium. The computer-readable storage mediumstores an instruction. When the computer-readable storage medium is runon a computer, the computer is enabled to perform the control planedevice switching method provided in the foregoing method embodiment.

All or some of the foregoing embodiments may be implemented throughsoftware, hardware, firmware, or any combination thereof. When softwareis used to implement the embodiments, all or some of the embodiments maybe implemented in a form of a computer program product. The computerprogram product includes one or more computer instructions. When thecomputer program instructions are loaded and executed on a computer, theprocedure or functions according to the embodiments of the presentdisclosure are all or partially generated. The computer may be a generalpurpose computer, a computer network, or another programmable apparatus.The computer instructions may be stored in a computer-readable storagemedium or may be transmitted from a computer-readable storage medium toanother computer-readable storage medium. For example, the computerinstructions may be transmitted from a website, computer, server, ordata center to another web site, computer, server, or data center in awired (for example, a coaxial cable, an optical fiber, or a digitalsubscriber line) or wireless (for example, infrared, radio, ormicrowave) manner. The computer-readable storage medium may be anyusable medium accessible by the computer, or a data storage device, suchas a server or a data center, integrating one or more usable media. Theusable medium may be a magnetic medium (for example, a floppy disk, ahard disk, or a magnetic tape), an optical medium, a semiconductormedium (for example, a solid-state drive), or the like.

The foregoing descriptions are merely specific implementations of thepresent disclosure, but are not intended to limit the protection scopeof the present disclosure. Any variation or replacement readily figuredout by a person skilled in the art within the technical scope disclosedin the present disclosure shall fall within the protection scope of thepresent disclosure. Therefore, the protection scope of the presentdisclosure shall be subject to the protection scope of the claims.

What is claimed is:
 1. A network device applied to a first user plane(UP) device, wherein the network device comprises: a memory configuredto store instructions; and one or more processors coupled to the memoryand configured to execute the instructions to: detect a firstcommunication of the first UP device with an active control plane (CP)device and a second communication of the first UP device with a standbyCP device, wherein the active CP device and the standby CP device are ina broadband remote access server (BRAS) system; send, to the standby CPdevice, a switching request when the first communication does not meet anormal communication condition and when the second communication meetsthe normal communication condition; receive, from the standby CP devicein response to the switching request, a switching instruction; andswitch, in response to the switching instruction, to the standby CPdevice.
 2. The network device of claim 1, wherein the one or moreprocessors are further configured to execute the instructions to: detectthat a quantity of data packet retransmissions between the first UPdevice and the active CP device within a preset duration is greater thanor equal to a retransmission quantity threshold; and further detect, inresponse to the quantity being greater than or equal to theretransmission quantity threshold, the first communication and thesecond communication.
 3. The network device of claim 1, wherein the oneor more processors are further configured to execute the instructionsto: receive, from the standby CP device, a detection instruction; andfurther detect, in response to the detection instruction, the firstcommunication and the second communication.
 4. The network device ofclaim 1, wherein the one or more processors are further configured toexecute the instructions to: continue to detect, within a time periodafter sending the switching request, the first communication and thesecond communication; detect, within the time period, that the firstcommunication meets the normal communication condition; and send, to thestandby CP device and in response to the first communication meeting thenormal communication condition, a switching cancellation request.
 5. Thenetwork device of claim 1, wherein the first communication comprisescommunication performance parameters having values, and wherein the oneor more processors are further configured to execute the instructionsto: detect that the first communication meets the normal communicationcondition when a quantity of the values that are within a normal valuerange is greater than or equal to a preset quantity threshold; anddetect that the first communication does not meet the normalcommunication condition when the quantity is less than the presetquantity threshold.
 6. A network device applied to a standby controlplane (CP) device, wherein the network device comprises: a memoryconfigured to store instructions; and one or more processors coupled tothe memory and configured to execute the instructions to: receive, froma first user plane (UP) device, a switching request indicating that afirst communication between the first UP device and an active CP devicedoes not meet a normal communication condition and a secondcommunication between the first UP device and the standby CP devicemeets the normal communication condition, wherein the first UP device isone of a plurality of second UP devices in a broadband remote accessserver (BRAS) system; and send, to the first UP device in response tothe switching request, a switching instruction instructing to switch tothe standby CP device.
 7. The network device of claim 6, wherein the oneor more processors are further configured to execute the instructionsto: detect whether a first quantity of third UP devices in the second UPdevices sending the switching request is greater than or equal to afirst quantity threshold; and send, to each of the second UP devices,the switching instruction when the first quantity is greater than orequal to the first quantity threshold.
 8. The network device of claim 7,wherein the one or more processors are further configured to execute theinstructions to: send, before detecting whether the first quantity isgreater than or equal to the first quantity threshold, a detectioninstruction to a fourth UP device in the plurality of second UP deviceswhen the first quantity is greater than or equal to a second quantitythreshold, wherein the detection instruction instructs the fourth UPdevice to detect a third communication between the fourth UP device andthe active CP device and a fourth communication between the fourth UPdevice and the standby CP device; and detect whether a sum of a secondquantity of fifth UP devices sending the switching request before thedetection instruction is sent and a third quantity of sixth UP devicessending the switching request within a first time period after thedetection instruction is sent is greater than or equal to the firstquantity threshold.
 9. The network device of claim 7, wherein the one ormore processors are further configured to: send, before detectingwhether the first quantity is greater than or equal to the firstquantity threshold, a detection instruction to a fourth UP device in theplurality of second UP devices when the first quantity is greater thanor equal to a second quantity threshold, wherein the fourth UP devicedoes not send the switching request, and wherein the detectioninstruction instructs the fourth UP device to detect a thirdcommunication between the fourth UP device and the active CP device anda fourth communication between the fourth UP device and the standby CPdevice; and detect, beyond a time period after the detection instructionis sent, whether a second quantity of fifth UP devices sending theswitching request within the time period is greater than or equal to thefirst quantity threshold.
 10. The network device of claim 7, wherein theone or more processors are further configured to: detect whether asecond quantity of fourth UP devices sending the switching requestwithin a time period is greater than or equal to the first quantitythreshold; and send, to each of the third UP devices, a switchingcancellation instruction when the second quantity is less than the firstquantity threshold.
 11. The network device of claim 6, wherein the oneor more processors are further configured to: receive, from the first UPdevice, a switching cancellation request; and set, in response toreceiving the switching cancellation request, the first UP device as athird UP device that does not send the switching request.
 12. A system,comprising: a first user plane (UP) device configured to: detect a firstcommunication of the first UP device with an active control plane (CP)device and a second communication with a standby CP device; send, to thestandby CP device, a first switching request when the firstcommunication does not meet a normal communication condition and thesecond communication meets the normal communication condition; receive,from the standby CP device, a switching instruction instructing toswitch to the standby CP device; and switch, in response to receivingthe switching instruction, to the standby CP device; and the standby CPdevice configured to: receive, from the first UP device, the firstswitching request; and send, to the first UP device in response to thefirst switching request, the switching instruction.
 13. The system ofclaim 12, wherein the standby CP device is further configured to:receive, from a plurality of second UP devices, a plurality of secondswitching requests; detect whether a quantity of the plurality of secondUP devices is greater than or equal to a first quantity threshold; andsend, to each of the plurality of second UP devices, the switchinginstruction when the quantity is greater than or equal to the firstquantity threshold.
 14. The system of claim 12, wherein the first UPdevice is further configured to: detect that a quantity of data packetretransmissions between the first UP device and the active CP devicewithin a preset duration is greater than or equal to a retransmissionquantity threshold; and detect, in response to detecting that thequantity is greater than or equal to the retransmission quantitythreshold, the first communication and the second communication.
 15. Thesystem of claim 12, wherein the first UP device is further configuredto: receive, from the standby CP device, a detection instruction; anddetect, in response to the detection instruction, the firstcommunication and the second communication.
 16. The system of claim 12,wherein the first UP device is further configured to: continue todetect, within a time period after sending the first switching request,the first communication and the second communication; detect, within thetime period, that the first communication meets the normal communicationcondition; and send, to the standby CP device and in response to thefirst communication meeting the normal communication condition, aswitching cancellation request.
 17. The system of claim 12, wherein thefirst communication comprises communication performance parametershaving values, and wherein the first UP device is further configured to:detect that the first communication meets the normal communicationcondition when a quantity of the values that are within a normal valuerange is greater than or equal to a preset quantity threshold; anddetect that the first communication does not meet the normalcommunication condition when the quantity is less than the presetquantity threshold.
 18. The system of claim 12, wherein the first UPdevice is one of a plurality of second UP devices in a broadband remoteaccess server (BRAS) system, and wherein the standby CP device isfurther configured to: detect whether a first quantity of third UPdevices of the plurality of second UP devices sending the firstswitching request is greater than or equal to a first quantitythreshold; and send, to each of the plurality of second UP devices, theswitching instruction instructing to switch to the standby CP devicewhen the first quantity is greater than or equal to the first quantitythreshold.
 19. The system of claim 18, wherein the standby CP device isfurther configured to: send, before detecting whether the first quantityis greater than or equal to the first quantity threshold, a detectioninstruction to a fourth UP device in the plurality of second UP deviceswhen the first quantity is greater than or equal to a second quantitythreshold, wherein the fourth UP device does not send the firstswitching request, and wherein the detection instruction instructs thefourth UP device to detect a third communication between the fourth UPdevice and the active CP device and a fourth communication between thefourth UP device and the standby CP device; and detect whether a sum ofa second quantity of fifth UP devices sending the first switchingrequest before the detection instruction is sent and a third quantity ofsixth UP devices sending the first switching request within a first timeperiod after the detection instruction is sent is greater than or equalto the first quantity threshold.
 20. The system of claim 18, wherein thestandby CP device is further configured to: send, before detectingwhether the first quantity is greater than or equal to the firstquantity threshold, a detection instruction to a fourth UP device in theplurality of second UP devices when the first quantity is greater thanor equal to a second quantity threshold, wherein the fourth UP devicedoes not send the first switching request, and wherein the detectioninstruction instructs the fourth UP device to detect a thirdcommunication between the fourth UP device and the active CP device anda fourth communication between the fourth UP device and the standby CPdevice; and detect, beyond a first time period after the detectioninstruction is sent, whether a second quantity of fifth UP devicessending the first switching request within the first time period isgreater than or equal to the first quantity threshold.